<html>
<head><meta charset="utf-8"><title>manual debug stability · t-lang · Zulip Chat Archive</title></head>
<h2>Stream: <a href="https://rust-lang.github.io/zulip_archive/stream/213817-t-lang/index.html">t-lang</a></h2>
<h3>Topic: <a href="https://rust-lang.github.io/zulip_archive/stream/213817-t-lang/topic/manual.20debug.20stability.html">manual debug stability</a></h3>

<hr>

<base href="https://rust-lang.zulipchat.com">

<head><link href="https://rust-lang.github.io/zulip_archive/style.css" rel="stylesheet"></head>

<a name="210355568"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/213817-t-lang/topic/manual%20debug%20stability/near/210355568" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jacob Pratt <a href="https://rust-lang.github.io/zulip_archive/stream/213817-t-lang/topic/manual.20debug.20stability.html#210355568">(Sep 17 2020 at 07:23)</a>:</h4>
<p>Is the output from <code>Formatter::debug_struct</code> and similar considered stable? All I see in documentation is that derived implementations are not.</p>



<a name="210357015"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/213817-t-lang/topic/manual%20debug%20stability/near/210357015" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> lzutao <a href="https://rust-lang.github.io/zulip_archive/stream/213817-t-lang/topic/manual.20debug.20stability.html#210357015">(Sep 17 2020 at 07:42)</a>:</h4>
<p>Nope</p>



<a name="210357096"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/213817-t-lang/topic/manual%20debug%20stability/near/210357096" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> lzutao <a href="https://rust-lang.github.io/zulip_archive/stream/213817-t-lang/topic/manual.20debug.20stability.html#210357096">(Sep 17 2020 at 07:44)</a>:</h4>
<p>In general, debug presentation is considered unstable between rust version.</p>



<a name="210358401"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/213817-t-lang/topic/manual%20debug%20stability/near/210358401" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jacob Pratt <a href="https://rust-lang.github.io/zulip_archive/stream/213817-t-lang/topic/manual.20debug.20stability.html#210358401">(Sep 17 2020 at 07:57)</a>:</h4>
<p>Has there ever been a situation where the representation has actually changed? Setting aside additions like non-exhaustive structs, which would require a change to the definition itself.</p>



<a name="210358943"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/213817-t-lang/topic/manual%20debug%20stability/near/210358943" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> lcnr <a href="https://rust-lang.github.io/zulip_archive/stream/213817-t-lang/topic/manual.20debug.20stability.html#210358943">(Sep 17 2020 at 08:02)</a>:</h4>
<p>yeah, we changed the output for <code>MutexGuard</code> in the past (and I think we probably also changed a lot of other things, but that is the only PR I remember rn)</p>



<a name="210359178"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/213817-t-lang/topic/manual%20debug%20stability/near/210359178" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jacob Pratt <a href="https://rust-lang.github.io/zulip_archive/stream/213817-t-lang/topic/manual.20debug.20stability.html#210359178">(Sep 17 2020 at 08:05)</a>:</h4>
<p>Only reason I ask is because I have manually implemented <code>Debug</code> for a packed struct, and have just added a test for it to CI (for the purpose of test coverage). Given its composition amounts to two named integer fields in a named struct, I would presume that wouldn't really change. But I suppose if it does, it's trivial enough to fix.</p>



<a name="210369932"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/213817-t-lang/topic/manual%20debug%20stability/near/210369932" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> bjorn3 <a href="https://rust-lang.github.io/zulip_archive/stream/213817-t-lang/topic/manual.20debug.20stability.html#210369932">(Sep 17 2020 at 10:06)</a>:</h4>
<p>The pretty debug printing of structs was once changed to add trailing commas.</p>



<a name="210417719"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/213817-t-lang/topic/manual%20debug%20stability/near/210417719" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> scottmcm <a href="https://rust-lang.github.io/zulip_archive/stream/213817-t-lang/topic/manual.20debug.20stability.html#210417719">(Sep 17 2020 at 16:53)</a>:</h4>
<p>I don't recall it ever happening for integers, though I could imagine changes potentially happening at some point to show 134217728 as <code>134_217_728</code> or adaptively as <code>0x0800_0000</code> or something some day.  But you're not the only person to have written such a test, and I agree that this is a place I wouldn't feel bad about "well, maybe I'll have to change this test in the future".</p>
<p>Aside: I think <code>Debug</code> and <code>Formatter</code> are the domain of <a class="stream" data-stream-id="219381" href="/#narrow/stream/219381-t-libs">#t-libs</a> , not lang.</p>



<a name="210417868"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/213817-t-lang/topic/manual%20debug%20stability/near/210417868" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/213817-t-lang/topic/manual.20debug.20stability.html#210417868">(Sep 17 2020 at 16:54)</a>:</h4>
<blockquote>
<p>Aside: I think Debug and Formatter are the domain of #t-libs , not lang.</p>
</blockquote>
<p>well, you can argue that's <em>because</em> they're not stable ;)</p>



<a name="210417900"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/213817-t-lang/topic/manual%20debug%20stability/near/210417900" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/213817-t-lang/topic/manual.20debug.20stability.html#210417900">(Sep 17 2020 at 16:55)</a>:</h4>
<p>as in, knowing whether this is <a class="stream" data-stream-id="213817" href="/#narrow/stream/213817-t-lang">#t-lang</a> or <a class="stream" data-stream-id="219381" href="/#narrow/stream/219381-t-libs">#t-libs</a> requires first knowing the answer to the question</p>



<a name="210417976"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/213817-t-lang/topic/manual%20debug%20stability/near/210417976" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> simulacrum <a href="https://rust-lang.github.io/zulip_archive/stream/213817-t-lang/topic/manual.20debug.20stability.html#210417976">(Sep 17 2020 at 16:55)</a>:</h4>
<p>No, it's always a libs concern imo. Not language surface area.</p>



<a name="210429026"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/213817-t-lang/topic/manual%20debug%20stability/near/210429026" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Josh Triplett <a href="https://rust-lang.github.io/zulip_archive/stream/213817-t-lang/topic/manual.20debug.20stability.html#210429026">(Sep 17 2020 at 18:16)</a>:</h4>
<p>Yeah, with my lang hat on, I can't think of <em>any</em> reason why the impls of Debug and Formatter would be within lang team scope.</p>



<a name="210484634"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/213817-t-lang/topic/manual%20debug%20stability/near/210484634" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jacob Pratt <a href="https://rust-lang.github.io/zulip_archive/stream/213817-t-lang/topic/manual.20debug.20stability.html#210484634">(Sep 18 2020 at 06:59)</a>:</h4>
<p>Whoops, sorry about the wrong team :) Joys of the Rust community is you get an answer either way &lt;3</p>



<hr><p>Last updated: Aug 07 2021 at 22:04 UTC</p>
</html>